package com.lyj.service.impl;


import com.lyj.mapper.NoticeMapper;
import com.lyj.pojo.Notice;
import com.lyj.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NoticeServiceImpl implements NoticeService {

    @Autowired
    NoticeMapper noticeMapper;

    @Override
    public List queryAllNotice() {
        List list = noticeMapper.queryAllNotice();
        System.out.println("==notice==service=="+list);
        return list;
    }

    @Override
    public Boolean addNoticeById(Notice notice) {

        Boolean aBoolean = noticeMapper.addNoticeById(notice);
        return aBoolean;
    }

    @Override
    public Boolean updateByNoticeId(Notice notice) {

        Boolean aBoolean = noticeMapper.updateByNoticeId(notice);
        return aBoolean;
    }

    @Override
    public Boolean delByNoticeId(int noticeId) {
        Boolean aBoolean = noticeMapper.delByNoticeId(noticeId);
        return aBoolean;
    }

    @Override
    public List querySenderNotice(int senderId) {
        List list = noticeMapper.querySenderNotice(senderId);
        return list;
    }

    @Override
    public List queryNotice(String str) {

        List list = noticeMapper.queryNotice(str);
        return list;
    }
}
